Accusoft.ImagXpress13.Net
Modify the Image Palette

The ImageX.Palette property gets or sets the color palette associated with the ImageX image (if the image is 8 bpp or less). The ImageX.CreateColorPalette method can be used to create a new color palette, which can be assigned to the ImageX image.  

C# Example
Copy Code
// This code demonstrates how to modify the first entry in the palette to red
System.Drawing.Imaging.ColorPalette palette;
palette = imageX.Palette;
if (palette.Entries.Length > 0)
{
palette.Entries[0] = System.Drawing.Color.Red;
imageX.Palette = palette;
} 

The ImageX.Palette property cannot be modified on the fly. The following code will NOT change the first entry in the ImageX.Palette:

C# Example
Copy Code
// This code demonstrates what does not work
imageX.Palette.Entries[0] = System.Drawing.Color.Red

 

Undo does not undo changes to palette. Undo only applies to processing actions.

See Also

 

 


©2019. Accusoft Corporation. All Rights Reserved.

Send Feedback